<template>
  <div class="app-container">
  	<div class="step-title">
			<el-steps :active="active" align-center finish-status="success">
				<el-step title="子设备"></el-step>
				<el-step title="文档信息"></el-step>
			</el-steps>
		</div>
     <!--子设备信息-->
    <h4 v-show="active == 0">子设备信息</h4>
    <div v-show="active == 0">
      <zichanzishebei :tempId="oid" :writeData="tempData"></zichanzishebei>
    </div>
		
    <div class="fileup" v-show="active == 1">
			<div class="uping" v-for="(item,index) in fileNum" :key="index">
				<p>
					<span>资料名</span>
					<input v-model="item.fileDescribe" type="text" placeholder="请输入您要上传的资料名" />
				</p>
				<p>
					<span>上传资料</span>
					<el-upload
						class="upload-demo"
						drag
						:data="index"
						:show-file-list="false"
						:http-request="designUpFile"
						action=""
						:multiple='false'
						limit='1'
						>
						<i class="el-icon-upload"></i>
						<div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
					</el-upload>
					<p style="margin: 0;">
						<strong v-if="item.fileName">{{item.fileDescribe}}</strong>
						<strong v-if="item.fileName" @click="downLoad(item.fileName)">下载<i class="el-icon-download" /></strong>
					</p>
				</p>
				<i class="el-icon-close delete" @click="deleteFile(item,index)"></i>
			</div>
		</div>
   
    
    <div class="submits" v-if="!islook">
			<div class="save" @click="prev" v-if="active != 0">上一步</div>
			<div class="save" @click="next" v-if="active < 1">下一步</div>
			<div class="add" @click="addfile" v-if="active == 1">新增文档</div>
		  <div class="save" :class="isClick ? 'disable' : ''" @click="baocun" v-if="active == 1">保存</div>
		  <!-- <div class="nosave" @click="nosaveOrder">取消</div> -->
		</div>

    <!-- 联系人弹窗 -->
    <el-dialog title="联系人" :visible.sync="buyerShow1" width="80%" top="20px">
      <div class="files">
				<div class="files-left">
					<el-menu class="el-menu-vertical-demo" @select="handleSelece" default-active="0">
						<el-menu-item :index='index' v-for="(item,index) in ifydata" :key="index">
							<span slot="title">{{item.departments}}</span>
						</el-menu-item>
					</el-menu>
				</div>
				<div class="files-right">
					<div class="files-btm">
						<el-table 
              :data="peopleData" 
              height="400" 
              highlight-current-row
              @current-change="handlePeople1"
              style="margin-bottom: 20px;" 
              :show-header="true" >
							<el-table-column align="center" prop="username" label="姓名"></el-table-column>
							<el-table-column align="center" prop="departments" label="所属部门"></el-table-column>
							<el-table-column align="center" prop="sex" label="性别"></el-table-column>
							<el-table-column align="center" prop="power" label="职务"></el-table-column>
						</el-table>
						<el-pagination background :page-size="50" hide-on-single-page layout="prev, pager, next" :total="total" @prev-click="goPrev" @next-click="goNext" />
					</div>
				</div>
			</div>
    </el-dialog>
    <!-- 负责人弹窗 -->
    <el-dialog title="负责人" :visible.sync="buyerShow2" width="80%" top="20px">
      <div class="files">
				<div class="files-left">
					<el-menu class="el-menu-vertical-demo" @select="handleSelece" default-active="0">
						<el-menu-item :index='index' v-for="(item,index) in ifydata" :key="index">
							<span slot="title">{{item.departments}}</span>
						</el-menu-item>
					</el-menu>
				</div>
				<div class="files-right">
					<div class="files-btm">
						<el-table 
              :data="peopleData" 
              height="400" 
              highlight-current-row
              @current-change="handlePeople2"
              style="margin-bottom: 20px;" 
              :show-header="true" >
							<el-table-column align="center" prop="username" label="姓名"></el-table-column>
							<el-table-column align="center" prop="departments" label="所属部门"></el-table-column>
							<el-table-column align="center" prop="sex" label="性别"></el-table-column>
							<el-table-column align="center" prop="power" label="职务"></el-table-column>
						</el-table>
						<el-pagination background :page-size="50" hide-on-single-page layout="prev, pager, next" :total="total" @prev-click="goPrev" @current-change='goPage' @next-click="goNext" />
					</div>
				</div>
			</div>
    </el-dialog>
    <!-- 使用人弹窗 -->
    <el-dialog title="使用人" :visible.sync="buyerShow3" width="80%" top="20px">
      <div class="files">
				<div class="files-left">
					<el-menu class="el-menu-vertical-demo" @select="handleSelece" default-active="0">
						<el-menu-item :index='index' v-for="(item,index) in ifydata" :key="index">
							<span slot="title">{{item.departments}}</span>
						</el-menu-item>
					</el-menu>
				</div>
				<div class="files-right">
					<div class="files-btm">
						<el-table 
              :data="peopleData" 
              height="400" 
              highlight-current-row
              @current-change="handlePeople3"
              style="margin-bottom: 20px;" 
              :show-header="true" >
							<el-table-column align="center" prop="username" label="姓名"></el-table-column>
							<el-table-column align="center" prop="departments" label="所属部门"></el-table-column>
							<el-table-column align="center" prop="sex" label="性别"></el-table-column>
							<el-table-column align="center" prop="power" label="职务"></el-table-column>
						</el-table>
						<el-pagination background :page-size="50" hide-on-single-page layout="prev, pager, next" :total="total" @prev-click="goPrev" @current-change='goPage' @next-click="goNext" />
					</div>
				</div>
			</div>
    </el-dialog>
    <!-- 管理员弹窗 -->
    <el-dialog title="管理员" :visible.sync="buyerShow4" width="80%" top="20px">
      <div class="files">
				<div class="files-left">
					<el-menu class="el-menu-vertical-demo" @select="handleSelece" default-active="0">
						<el-menu-item :index='index' v-for="(item,index) in ifydata" :key="index">
							<span slot="title">{{item.departments}}</span>
						</el-menu-item>
					</el-menu>
				</div>
				<div class="files-right">
					<div class="files-btm">
						<el-table 
              :data="peopleData" 
              height="400" 
              highlight-current-row
              @current-change="handlePeople4"
              style="margin-bottom: 20px;" 
              :show-header="true" >
							<el-table-column align="center" prop="username" label="姓名"></el-table-column>
							<el-table-column align="center" prop="departments" label="所属部门"></el-table-column>
							<el-table-column align="center" prop="sex" label="性别"></el-table-column>
							<el-table-column align="center" prop="power" label="职务"></el-table-column>
						</el-table>
						<el-pagination background :page-size="50" hide-on-single-page layout="prev, pager, next" :total="total" @prev-click="goPrev" @current-change='goPage' @next-click="goNext" />
					</div>
				</div>
			</div>
    </el-dialog>
  </div>
</template>
<script>
import { addRuku,updateRuku,rukuList,uploadFile,getGongying,getSeting,getFenlei,getziFenlei } from "@/api/caigou";
import { getUser, getBumenNew, getUserFiles,uploadFilelian,deleteFilelian,updateFilelian } from "@/api/people"
import zichanzishebei from './bumenzishebei'
let chejianId = null,temp = null,navindex = null;
let fatherid = null
export default {
  data() {
    return {
      radio: "1",
      total: 1,
      page: 1,
      oid:'',
      value: "",
      active: 0,
      tableData: [],
      tempData: {
        areas: "", //地区
        belongCompany: "", //所属公司
        companys: "", //使用公司
        creatorPerson: "", //创建人
        departments: "", //使用部门
        erweima: "", // 二维码
        imgurl: "", //图片地址
        maintainCycle: "", //维修周期
        managerPerson: "", //管理员
        parentId: "", //父类id
        propertyGuige: "", //资产规格
        propertyJine: "", //金额
        propertyName: "", //资产名称
        propertyNums: "", //数量
        propertySn: "", //资产SN码
        propertyType: "", //资产类别
        purchaseTime: "", //购买时间
        serviceLife: "", //使用期限
        sourceOf: "", //来源
        spareIs: "", //是否有备用品
        status: "", //状态
        storeAreas: "", //存放地址
        suppliers: "", //供应商
        usePerson: "", //使用人
        starchOrganizationAlteration:{},
        subtypeDtoList:[]
      },
      cunfangdi: [],  //存放地分类
      diqu: [],      //地区分类
      company: [],    //公司分类
      beiyong: [
        {
          id: 0,
          num: "否",
        },
        {
          id: 1,
          num: "是",
        },
      ],
      laiyuan: [],  //来源分类
      shiyongqixian: [],  //使用期限分类
      weixiuzhouqi: [],    //维修周期分类
      zichanfenlei: [], //资产分类
      zizichanfenlei: [], //子设备分类
      fileNum: [
        {
          fileName: "",
          fileDescribe: "",
          parentId:"",
        },
      ], //需要上传的文件个数
      ifydata: [], //部门列表
      bumen: "", //部门值
      buyerList: {},
      gongying: [], //供应商管理
      gys: "", //供应商选择值
      proDeail: [], //商品列表
      peopleData: [], //人员列表
      currentRow: null,
      gyShow: false, //供应商弹窗状态
      buyerShow1: false, //采购员弹窗状态
      buyerShow2: false, //采购员弹窗状态
      buyerShow3: false, //采购员弹窗状态
      buyerShow4: false, //采购员弹窗状态
      addProShow: false, //商品信息弹窗
      proData: [],
      writOradd: 0, //0新增，1编辑
      islook: false,
      isClick:false,
      fileName:'',
      fileDescribe:'',
      flagId: null
    };
  },
  components:{
    zichanzishebei
  },
  mounted() {
    const userinfo = this.$store.state.user.userInfo[0]
    this.getpeople(userinfo.departments)
    this.bumenList()
    this.getSet()
    this.getClassify()
    // this.gongyingList();
    if(this.$route.params.options){
      this.writOradd = 1
      this.tempData = JSON.parse(this.$route.params.options)
      temp = JSON.parse(this.$route.params.options)
      this.oid = temp.oid
			// this.getFilesList(this.tempData.oid)
      console.log('this.tempData',this.tempData)
    }else{
      this.writOradd = 0
    }
  },
  methods: {
    next() {
      console.log(this.active)
      if(this.active == 0){
        this.getFilesList(this.oid)
      }
      if(this.active == 1){
        // this.getFilesList(this.oid)
      }
      if (this.active++ > 1) {
        this.active = 0;
      }
    },
    prev() {
      if (this.active-- < 1) {
        this.active = 0;
      }
    },
    addfile(){
      this.fileNum.push({
        fileName: "",
        fileDescribe: "",
        parentId:"",
      })
    },
    // 上传商品文件
    designUpFile(item) {
      console.log('新增文档')
      const loading = this.$loading({
        lock: true,
        text: '上传中请稍等...',
        spinner: 'el-icon-loading',
        background: 'rgba(255, 255, 255, 0.8)'
      })
      console.log('上传点击',item)
      var formData = new FormData()
      formData.append("file", item.file)
      formData.append('content', this.fileNum[item.data].filename)
      uploadFile(formData).then(res => {
        console.log(res)
				// this.fileNum[item.data].filePath = res
        this.$forceUpdate()
        this.uploadOver = true
        this.fileNum[item.data].fileName = res
        if(this.fileNum[item.data].fileId) {
          updateFilelian(this.fileNum[item.data]).then(res => {
            console.log(res)
            this.$message({
              message: '修改成功',
              type: "success",
            });
            loading.close()
          })
        }else{
          this.fileNum[item.data].parentId = this.oid
          console.log(this.fileNum)
          uploadFilelian(this.fileNum[item.data]).then(res => {
            console.log(res)
            this.$message({
              message: '添加成功',
              type: "success",
            });
            loading.close()
          })
        }
      })
    },
    baocun(){
      console.log('----------------------------')
      sessionStorage.removeItem('writeZishebei')
      this.$router.go(-1);
    },
			
    // 获取资产分类
    getClassify(){
      getFenlei({}).then(res => {
        console.log('分类',res)
        this.zichanfenlei = res.data
      })
      getziFenlei({}).then(res => {
        console.log('子分类',res)
        this.zizichanfenlei = res.data
      })
    },
    /**
     * 获取下拉框设置
     */
    getSet(){
      getSeting({}).then(res => {
        // status 1代表公司类型,2.地区名称,3.存放仓库,4.来源,5.资产类型,6.使用期限,7.供应商,8.巡检周期 
        console.log('seting',res)
        // 公司类型
        this.company = res.data.filter(item => item.status === '1')
        // 地区名称
        this.diqu = res.data.filter(item => item.status === '2')
        // 存放仓库
        this.cunfangdi = res.data.filter(item => item.status === '3')
        // 来源
        this.laiyuan = res.data.filter(item => item.status === '4')
        // 使用期限
        this.shiyongqixian = res.data.filter(item => item.status === '6')
        // 供应商
        this.gongying = res.data.filter(item => item.status === '7')
        // 巡检周期
        let zhouqi = res.data.filter(item => item.status === '8')
        this.weixiuzhouqi = zhouqi.map(item => {
          item.names = item.names+'天'
          return item
        })
      })
    },
    /**
     * 根据name递归查找对应id
     */
    nameSearchId(name,arr){
      for(let i = 0;i<arr.length;i++){
        if(name === arr[i].name){
          console.log(name,arr[i].name)
          chejianId = arr[i].id
          return
        }else{
          if(arr[i].depositoryDtoList){
            this.nameSearchId(name,arr[i].depositoryDtoList)
          }
        }
      }
    },
    //	新增入库
    saveOrder() {
      // this.zhuangtai();
      console.log(this.tempData)
      if(!this.tempData.propertyName){
        this.$message({
          message:'请完善资产信息',
          type: 'warning'
        })
        return
      }
      console.log(this.tempData);
      console.log(temp)
      if(!temp || temp.parentId !== this.tempData.parentId){
        console.log('budeng')
        this.tempData.parentId = this.tempData.parentId[this.tempData.parentId.length*1 -1]
        this.tempData.propertyType = this.tempData.parentId
      }else{
        delete this.tempData.propertyType
      }
      this.tempData.suppliers = this.tempData.starchOrganizationAlteration.suppliers
      // console.log(chejianId)
      this.tempData.maintainCycle = parseInt(this.tempData.maintainCycle)
      this.tempData.starchOrganizationAlteration.ptypes = 2
      if(this.writOradd === 0){
        this.tempData.status = "闲置";
      	this.isClick = true
        addRuku(this.tempData).then((res) => {
          console.log(res.data);
          this.$message({
            message: res.message,
            type: "success",
          });
          fatherid = this.tempData.oid
          this.isClick = false
          this.oid = res.data.oid
          console.log(fatherid)
//        this.$router.go(-1);
        });
      }else{
      	this.isClick = true
        updateRuku(this.tempData).then((res) => {
          console.log("-------------------");
          console.log(res);
          this.$message({
            message: res.message,
            type: "success",
          });
          fatherid = this.tempData.oid
          this.isClick = false
          this.oid = this.tempData.oid
//        this.$router.go(-1);
        }).catch(res => {
						this.isClick = false
				});
      }
    },
    //  获取设备文件列表
    getFilesList(id){
    	console.log('!!!!!!!!!!!!!!!!!!!!!!')
      getUserFiles({parentId:id}).then(res => {
        console.log('文件列表',res)
        if(res.data.list.length != 0){
          this.fileNum = []
          res.data.list.map(item => {
            this.fileNum.push({
              fileDescribe: item.fileDescribe,
              fileName: item.fileName,
              fileId: item.fileId,
              parentId: item.parentId
            })
          })
        }
      })
    },
    downLoad(filepath) {
      window.open(filepath);
    },
    deleteFile(item,index){
      console.log(this.fileNum[index])
      deleteFilelian(this.fileNum[index].fileId).then(res => {
        console.log(res)
        this.getFilesList(this.oid)
        this.$message({
          message: '删除成功！',
          type: 'success'
        })
      })
    },
    designUpAvatar(item) {
      console.log(this.fileNum);
      var formData = new FormData();
      const loading = this.$loading({
        lock: true,
        text: "上传中请稍等...",
        spinner: "el-icon-loading",
        background: "rgba(255, 255, 255, 0.8)",
      });
      formData.append("file", item.file);
      uploadFile(formData).then((res) => {
        console.log(res);
        this.$message({
          showClose: true,
          message: "添加成功",
          type: "success",
        });
        loading.close();
        this.imageUrl = res;
        this.tempData.imgurl = res;
        console.log(this.tempData.imgurl);
      });
    },
    // 人员列表
    getpeople(id) {
      console.log("id:", id);
      getUser({ departments: id,currentPage: this.page}).then((res) => {
        console.log(res);
        this.peopleData = res.data.list;
        this.total = res.data.total
      });
    },
    // 部门列表
    bumenList() {
      getBumenNew({}).then((res) => {
        console.log("----------------");
        console.log(res);
        let temp = res.data.filter(item => item.ids === '456')[0].departmentsList
        console.log(temp)
        temp.map((item) => {
          item.value = item.departments;
          return item;
        });
        this.ifydata = temp;
      });
    },

    // 供应商列表
    // gongyingList() {
    //   getGongying({}).then((res) => {
    //     console.log(res);
    //     this.gongying = res.data;
    //   });
    // },
    // 选择人员分类
    handleSelece(index) {
      console.log(index);
      console.log("ifydata:", this.ifydata[index]);
      navindex = this.ifydata[index].value
        ? this.ifydata[index].value
        : null;
      this.getpeople(navindex);
    },
    // 分页
    goPrev(page) {
      console.log(page)
      this.page--
      this.getpeople(navindex)
    },
    goNext(page) {
      console.log(page)
      this.page++
      this.getpeople(navindex)
    },
    goPage(page){
      console.log(page)
      this.page = page
      this.getpeople(navindex)
    },
    // 确认选择供应商
    handleGongying(val) {
      console.log(val);
      this.currentRow = val.name;
    },
    // 选择供应商
    checkGy() {
      this.gyShow = true;
    },
    // 选择负责人
    checkBuyer1() {
      this.buyerShow1 = true;
    },
    // 选择联系人
    checkBuyer2() {
      this.buyerShow2 = true;
    },
    // 选择负责人
    checkBuyer3() {
      this.buyerShow3 = true;
    },
    // 选择联系人
    checkBuyer4() {
      this.buyerShow4 = true;
    },
    // 选择联系人
    handlePeople1(row) {
      console.log(row);
      this.tempData.starchOrganizationAlteration.persons = row.username;
      this.buyerShow1 = false;
    },
    // 选择负责人
    handlePeople2(row) {
      console.log(row);
      this.tempData.starchOrganizationAlteration.chargePerson = row.username;
      this.buyerShow2 = false;
    },
    // 选择使用人
    handlePeople3(row) {
      console.log(row);
      this.tempData.usePerson = row.username;
      this.buyerShow3 = false;
    },
    // 选择管理员
    handlePeople4(row) {
      console.log(row);
      this.tempData.managerPerson = row.username;
      this.buyerShow4 = false;
    },
    // 删除对应商品数据
    deleteRow(value, index) {
      console.log(index);
      this.proData.splice(index, 1);
    },
    // 取消新增
    nosaveOrder() {
      console.log("取消");
      this.$router.go(-1);
    },
  },
};
</script>
<style lang="scss" scoped>
/deep/.el-input-group__append button.el-button{
  padding: 8px 12px;
}
.popup {
  padding: 0 20px;
}
.product {
  display: flex;
  .pro-l {
    width: 200px;
  }
  .pro-r {
    flex: 1;
    overflow: hidden;
    /deep/.el-table--enable-row-hover .el-table__body tr:hover > td {
      background-color: rgba(24, 160, 94, 0.2);
    }
    /deep/.el-table tr {
      cursor: pointer;
    }
    /deep/.el-table__body tr.current-row > td {
      background-color: rgba(24, 160, 94, 0.4);
    }
  }
}
.files {
  display: flex;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  margin-top: 20px;
  overflow: hidden;
  padding: 20px;
}
.files-btm .btn-prev:after {
  content: "上一页";
}
.files-btm .btn-next:before {
  content: "下一页";
}
.files-btm .btn-prev,
.files-btm .btn-next {
  width: 65px;
}
.fileup{
  position: relative;
  padding: 20px;
  background: #fff;
  border-radius: 0 0 8px 8px;
  display: flex;
  flex-wrap: wrap;
  // align-items: center;
  justify-content: space-between;
  .uping{
    width: 48%;
    position: relative;
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    &:hover .delete{
      display: block;
    }
    > p {
      width: 90%;
      font-size: 14px;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      color: #333;
      /deep/.el-input__inner {
        // width: inherit;
        background: none;
        height: 32px;
        // line-height: 32px;
        color: #333;
        border: 1px solid rgba(0, 0, 0, 0.1);
        padding: 0 25px;
      }
      /deep/.el-input__icon {
        line-height: 32px;
      }
      /deep/.el-upload-dragger {
        width: 100%;
        height: 100px;
      }
      /deep/.el-upload-dragger .el-icon-upload {
        font-size: 60px;
        color: #C0C4CC;
        margin: 0; 
        line-height: 1;
        width: 100%;
      }
      /deep/.el-upload {
        width: 100%;
      }
      .userselect {
        // max-width: 250px;
        flex: 1;
        display: flex;
        line-height: 30px;
      }
    
      > span {
        display: block;
        width: 100px;
        text-align: right;
        padding-right: 15px;
      }
      > input {
        width: inherit;
        flex: 1;
        height: 32px;
        border-radius: 3px;
        border: 1px solid rgba(0, 0, 0, 0.1);
        padding-left: 10px;
        color: #333;
      }
      >strong{
        display: inline-block;
        padding-left: 100px;
        font-weight: 100;
        font-size: 14px;
        &:last-child{
          cursor: pointer;
          color: #13ce66;
          font-weight: 600;
        }
      }
      >div{
        width: inherit;
        flex: 1;
      }
    }
    .delete{
      position: absolute;
      z-index: 99;
      top: 0px;
      right: 10px;
      cursor: pointer;
      transition: all .5s;
      display: none;
    }
  }
}

.add{
  background: #18a05e;
}

.files-left {
	width: 160px;
	margin-right: 20px;
  height: 420px;
  overflow-y: auto;
  /*滚动条样式*/
  &::-webkit-scrollbar {
    width: 6px;
  }
  &::-webkit-scrollbar-thumb {
    border-radius: 10px;
    -webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
    background: rgba(0,0,0,0.2);
  }
  &::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
    border-radius: 0;
    background: rgba(0,0,0,0.01);
  }
	/deep/.el-menu{
		border-right: none;
	}
	/deep/.el-menu-item{
		height: 35px;
		line-height: 35px;
		margin-bottom: 8px;
	}
	/deep/.el-menu-item.is-active{
		color: #fff;
		border-radius: 5px;
		background: rgba(24,160,94,.8);
	}
}


.files-right {
  flex: 1;
  overflow: hidden;
}
.files-btm {
  background: rgba(255, 255, 255, 1);
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  // margin-top: 20px;
  overflow: hidden;
  &-title {
    display: flex;
    align-items: center;
    height: 45px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: #ffffff;
    > p {
      text-align: center;
      font-size: 16px;
      color: #333;
    }
  }
  .addDate {
    margin: 20px 32px 10px 32px;
    height: 32px;
    border-radius: 3px;
    text-align: center;
    line-height: 32px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    border: 1px dashed rgba(0, 0, 0, 0.3);
  }
  .el-button--text {
    margin: 0 15px;
  }
}
.avatar {
  width: 30px;
  height: 30px;
}
.zd3-btm {
  background: rgba(255, 255, 255, 1);
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  margin-top: 10px;
  overflow: hidden;
  &-title {
    display: flex;
    align-items: center;
    height: 70px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: #ffffff;
    > p {
      text-align: center;
      font-size: 16px;
      color: #333;
    }
  }
  .addDate {
    margin: 20px 32px 10px 32px;
    height: 32px;
    border-radius: 3px;
    text-align: center;
    line-height: 32px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    border: 1px dashed rgba(0, 0, 0, 0.3);
  }
  .el-button--text {
    margin: 0 15px;
  }
}
.inps {
  width: 95%;
  height: 32px;
  line-height: 32px;
  padding-left: 10px;
  background: none;
  border: none;
  color: rgba(0, 0, 0, 0.8);
}
.inps-active {
  width: 95%;
  height: 32px;
  line-height: 32px;
  padding-left: 10px;
  background: rgba(24, 160, 94, 0.2);
  border: none;
  color: rgba(0, 0, 0, 0.8);
}
h4 {
  background: #fff;
  padding-top: 12px;
  padding-bottom: 12px;
  margin: 0;
  padding-left: 10px;
  border-radius: 8px 8px 0 0;
  border-bottom: 1px solid #ccc;
}
.change {
  display: flex;
  flex-wrap: wrap;
  background: #fff;
  border-radius: 0 0 8px 8px;
  padding: 20px;
  margin-bottom: 10px;
  > p {
    width: 25%;
    font-size: 14px;
    display: flex;
    align-items: center;
    color: #333;
    /deep/.el-input__inner {
      // width: inherit;
      background: none;
      height: 32px;
      // line-height: 32px;
      color: #333;
      border: 1px solid rgba(0, 0, 0, 0.1);
      padding: 0 25px;
    }
    /deep/.el-input__icon {
      line-height: 32px;
    }
    .userselect {
      // max-width: 250px;
      flex: 1;
    }

    > span {
      display: block;
      width: 120px;
      text-align: right;
      padding-right: 15px;
    }
    > input {
      width: inherit;
      flex: 1;
      height: 32px;
      border-radius: 3px;
      border: 1px solid rgba(0, 0, 0, 0.1);
      padding-left: 10px;
      color: #333;
    }
  }
}
.submits {
  display: flex;
  padding: 15px 20px;
  justify-content: flex-end;
  align-items: center;
  > div {
    width: 80px;
    height: 32px;
    text-align: center;
    line-height: 32px;
    color: #fff;
    font-size: 14px;
    border-radius: 4px;
    margin-left: 30px;
    cursor: pointer;
  }
  .save {
    background: #2196f3;
  }
  .nosave {
    background: #999;
  }
}

.avatar-uploader .el-upload {
  border: 1px dashed #999 !important;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  width: 100%;
}
.avatar-uploader .el-upload:hover {
  border-color: #409eff;
}

.avatar-uploader-icon {
  font-size: 28px;
  color: #8c939d;
  width: 100px;
  height: 100px;
  line-height: 100px;
  text-align: center;
  border: 1px solid #ccc;
}
.avatar1 {
  width: 100px;
  height: 100px;
  display: block;
}

@media screen and (max-width: 1400px) {
  .change > p {
    width: 33%;
  }
}
</style>